package com.fancy.recommendation.constant;

/**
 * 推荐服务常量定义
 *
 * @author fancy
 */
public class RecommendationConstants {

    /**
     * 推荐类型
     */
    public static class RecType {
        public static final String SONG = "song";
        public static final String ALBUM = "album";
        public static final String PLAYLIST = "playlist";
        public static final String ARTIST = "artist";
    }

    /**
     * 行为类型
     */
    public static class ActionType {
        public static final String PLAY = "play";
        public static final String LIKE = "like";
        public static final String COLLECT = "collect";
        public static final String SHARE = "share";
        public static final String COMMENT = "comment";
        public static final String SKIP = "skip";
        public static final String DOWNLOAD = "download";
    }

    /**
     * 推荐算法类型
     */
    public static class AlgorithmType {
        public static final String COLLABORATIVE_FILTERING = "collaborative_filtering";
        public static final String CONTENT_BASED = "content_based";
        public static final String TRENDING = "trending";
        public static final String HYBRID = "hybrid";
        public static final String SIMILAR = "similar";
    }

    /**
     * 榜单类型
     */
    public static class RankingType {
        public static final String HOT_SONGS = "hot_songs";
        public static final String NEW_SONGS = "new_songs";
        public static final String HOT_ALBUMS = "hot_albums";
        public static final String HOT_ARTISTS = "hot_artists";
        public static final String HOT_PLAYLISTS = "hot_playlists";
    }

    /**
     * 周期类型
     */
    public static class PeriodType {
        public static final String DAILY = "daily";
        public static final String WEEKLY = "weekly";
        public static final String MONTHLY = "monthly";
    }

    /**
     * 偏好类型
     */
    public static class PreferenceType {
        public static final String GENRE = "genre";
        public static final String ARTIST = "artist";
        public static final String LANGUAGE = "language";
        public static final String DECADE = "decade";
        public static final String MOOD = "mood";
    }

    /**
     * 缓存键前缀
     */
    public static class CacheKey {
        public static final String RECOMMENDATION_PREFIX = "recommendation:";
        public static final String RANKING_PREFIX = "ranking:";
        public static final String BEHAVIOR_STATS_PREFIX = "behavior:stats:";
        public static final String USER_PREFERENCE_PREFIX = "user:preference:";
        public static final String HOT_CONTENT_PREFIX = "hot:content:";
        public static final String REALTIME_HOT_PREFIX = "realtime:hot:";
    }

    /**
     * 推荐状态
     */
    public static class RecommendationStatus {
        public static final Integer INVALID = 0;
        public static final Integer VALID = 1;
    }

    /**
     * 默认配置值
     */
    public static class DefaultValue {
        public static final Integer DEFAULT_RECOMMENDATION_SIZE = 20;
        public static final Integer DEFAULT_RANKING_SIZE = 50;
        public static final Integer DEFAULT_CACHE_DURATION = 60; // 分钟
        public static final Double DEFAULT_SIMILARITY_THRESHOLD = 0.1;
        public static final Integer DEFAULT_HISTORY_KEEP_DAYS = 90;
    }
}
